package com.sdc.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope //注解@RefreshScope指示Config客户端在服务器参数刷新时，也刷新注入的属性值，详情可见后续的章节
@RestController
public class MessageRestController {
    @Value("${message}")
    private String message;
    @Value("${info}")
    private String info;

    @RequestMapping("/message")
    String message(){
        return this.message;
    }

    @RequestMapping("/inf")
    String info(){
        return this.info;
    }   

}